package chuishop.yiqimaicai.service.Impl;

import chuishop.yiqimaicai.mapper.UserInfoMapper;
import chuishop.yiqimaicai.pojo.UserInfo;
import chuishop.yiqimaicai.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserInfoServiceImpl implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;
    @Override
    public List<UserInfo> findUserInfo() {
        return userInfoMapper.findUserInfo();
    }

    @Override
    public boolean delUserInfoByIds(String[] ids) {
        return userInfoMapper.delUserInfoByIds(ids)>0;
    }

    @Override
    public boolean addUserInfo(UserInfo userInfo) {
        return userInfoMapper.addUserInfo(userInfo)>0;
    }

    @Override
    public boolean updataUserinfo(UserInfo userInfo) {
        return userInfoMapper.updataUserinfo(userInfo)>0;
    }

    @Override
    public List<UserInfo> findUserInfoByname(String nsename) {
        return userInfoMapper.findUserInfoByname(nsename);
    }
}
